package pt.compflow.job;

import pt.compflow.activity.ActivityControllerListener;
import pt.compflow.flowontology.model.Job;
import pt.compflow.interfaces.event.EventInterfaceListener;

/**
 *	JobController handles all jobs in the system (top-level handler).
 *	
 *	Implements EventInterfaceListener since it handles all instantiation events
 *	(that launch new workflow-definition instances).
 *
 *	Implements ActivityControllerListener to handle workflow-definition instance events
 *	sent by activity controllers (e.g. TaskController)
 *
 */
public interface JobController extends EventInterfaceListener, ActivityControllerListener{
//	public void startPending();
	public Job loadAndStartJob(String ownerUri, String jobTemplateId);

	public void start();
	public void stop();
	
	public boolean addListener(ActivityControllerListener l);
	public boolean removeListener(ActivityControllerListener l);
	public void removeAllListeners();
}
